package com.wanmait.deliverymangementsystem.runnercontroller;

import com.wanmait.deliverymangementsystem.pojo.City;
import com.wanmait.deliverymangementsystem.service.CityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("runner")
public class RunnerCityController {
    @Resource
    private CityService cityService;

    @GetMapping("searchCity")
    @ResponseBody
    public List<City> searchCity(Integer provinceID){
        List<City>  cityList =  cityService.findCityByProvinceID(provinceID);
        return cityList;
    }
}
